const express   = require('express');
const Image  = require('../controllers/image');
const router    = express.Router();

/**
 * @desc    数据初始化
 * @method  {*请求方法} GET
 */
router.get('/init', function (req, res, next) {

    Image.init(req, res, next);
})

/**
 * @desc    查询所有
 * @method  {*请求方法} GET
 */
router.get('/', function (req, res, next) {

    Image.findAll(req, res, next);
})

/**
 * @desc    查询指定ID
 * @method  {*请求方法} GET
 */
router.get('/:id', function (req, res, next) {
    Image.findById(req, res, next);
})

module.exports = router;
